package org.eccl.platform.rde.web.component;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

import org.eccl.platform.rde.web.component.entity.ScopeInfo;

/************
 * RdeClient 实现
 * @author luwenhe
 *
 */
@Path("/rde")
@Consumes("text/html")
public interface RdeClient {

	@GET
	@Path("/scopeInfo")
	@Produces("text/json")
	public ScopeInfo getScopeInfo(@FormParam("scopePath") List<String> scopePath);

	@POST
	@Path("/scope")
	public void addScope(List<String> relateConceptPath) ;

	@PUT
	@Path("/scopes/{scopePath}/relateConcept/{conceptPath}")
	public void relateScopeToConcept(@PathParam("scopePath") List<String> scopePath, @PathParam("conceptPath") List<String> conceptPath);

	@DELETE
	@Path("/scopes/{scopePath}")
	public void deleteScope(@PathParam("scopePath") List<String> scopePath);
	


	@POST
	@Path("/concept")
	public void addConcept(@FormParam("scopePath") List<String> scopePath, @FormParam("conceptName") String conceptName);
	
	@PUT
	@Path("/concepts/{conceptPath}/{changeName}")
	public void changeConceptName(@PathParam("conceptPath") List<String> conceptPath, @PathParam("changeName") String changeName);

	@DELETE
	@Path("/concepts/{conceptPath}")
	public void deleteConcept(@PathParam("conceptPath") List<String> conceptPath);
	
	@PUT
	@Path("/concepts/{conceptPath}/moveTo/{targetScopePath}")
	public void moveConcept(@PathParam("conceptPath") List<String> conceptPath, @PathParam("targetScopePath") List<String> targetScopePath);

}
